<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <script src="./vue.global.js"></script>
    <link rel="stylesheet" href="./index.css" />
    <link rel="stylesheet" href="./table.css" />
    <link rel="stylesheet" href="./pugong.css" />
    <link rel="stylesheet" href="./utils.css" />
    <script src="./index.full.js"></script>

    <script>
      //适配代码
      (function (doc, win) {
        var docEI = doc.documentElement,
          resizeEvt = "orientationchange" in window ? "orientataionchange" : "resize",
          recalc = function () {
            var clientWidth = docEI.clientWidth;
            if (!clientWidth) return;
            //100是字体大小，1536是开发时浏览器窗口的宽度，等比计算
            docEI.style.fontSize = 100 * (clientWidth / 1536) + "px";
          };

        if (!doc.addEventListener) return;
        win.addEventListener(resizeEvt, recalc, false);
        doc.addEventListener("DOMContentLoaded", recalc, false);
      })(document, window);
    </script>
    <style>
      * {
        /* margin: 0;
        padding: 0; */
        font-size: 0.25rem;
      }
    </style>
  </head>

  <body>
    <div id="app" class="table-content text-left">
      <h3 class="text-center mb-20" style="font-size: 0.25rem">农民工入场承诺书</h3>

      <div style="font-size: 20px">
        <div class="danger-info">
          本人<el-input v-model="admissionForm.name" class="width-100 border_bottom_1" placeholder=" "></el-input> （身份证号：<el-input v-model="admissionForm.idCard" class="width-250 border_bottom_1" placeholder=" "></el-input>、 联系电话：<el-input v-model="admissionForm.phone" class="width-250 border_bottom_1" placeholder=" "></el-input>） 是<el-input
            v-model="admissionForm.laborName"
            class="width-250 border_bottom_1"
            placeholder=" "></el-input>
          公司承建中铁九局集团有限公司盐宜铁路站前施工10标段项目<el-input v-model="admissionForm.workTypeName" class="width-250 border_bottom_1" placeholder=" "></el-input>
          工程施工的工人。本人郑重承诺并保证做到以下几点：
        </div>
        <div class="text-indent mb-10">一、严格遵守法律法规、公司管理规定，并服从和接受各级管理。</div>
        <div class="text-indent mb-10">二、知悉公司的各项规章制度、项目告示牌和权益维护牌上公示的各项内容，自愿配合公司落实“农民工实名制”各项工作。</div>
        <div class="text-indent mb-10">三、不隐瞒且如实提供个人的身份信息，如实报告个人作业技能，持证真实性，健康状况，主动报告不能适应工作。</div>
        <div class="text-indent mb-10">四、公司用于发放工资的银行卡由本人使用和保管，本人定期与班组长核实确定工资款，不虚报出勤，不冒领工资，否则本人自愿承担相应法律责任。</div>
        <div class="text-indent mb-10">五、当自己合法权益受到侵害时（如劳资纠纷、工伤事故纠纷等），向公司（项目部）申诉或向总包单位请求协调解决，在处理无效的情况下，依法向有关部门举报投诉。自觉遵守法律法规，决不采取闹访、围攻围堵公共设施等非法过激行为，决不恶意或过激讨薪，通过合法途径理性反映诉求。如有无理或非法行为愿意承担一切法律责任。</div>
        <div class="text-indent mb-10">六、承诺在入场前后所提供的任何资料和信息均真实有效，否则，由此引起的一切后果均由我本人承担。</div>
      </div>

      <div class="d-flex flex-row mt-2 justify-content-end">
        <div class="flex">
          <div @click="setUpEquipment('admissionForm.promiseSign','TaskSignFinger')">承诺人（签字并加按指印）：</div>
          <el-image v-show="admissionForm.promiseSign" class="sign_img" :src="admissionForm.promiseSign" fit="fill"></el-image>
        </div>
      </div>

      <div class="d-flex flex-row mt-2 justify-content-end">
        <el-input v-model="admissionForm.year" class="people-input" placeholder=" " style="width: 0.8rem"></el-input>
        年
        <el-input v-model="admissionForm.month" class="people-input" placeholder=" " style="width: 0.5rem"></el-input>
        月
        <el-input v-model="admissionForm.day" class="people-input" placeholder=" " style="width: 0.5rem"></el-input>
        日
      </div>
    </div>
    <script>
      const { createApp, reactive, toRefs, ref, onMounted } = Vue;
      const vue3Composition = {
        setup() {
          const admissionForm = ref({
            year: "",
            month: "",
            day: "",
            name: "",
            idCard: "",
            phone: "",
            laborName: "", // 公司
            workTypeName: "", // 班组
            promiseSign: "", //承诺人
          });

          window.setSign = (event) => {
            admissionForm.value[event.key] = event.img;
          };

          window.getData = (event) => {
            return admissionForm.value;
          };
          window.setData = (data) => {
            admissionForm.value.year = data.year;
            admissionForm.value.month = data.month;
            admissionForm.value.day = data.day;
            admissionForm.value.name = data.name;
            admissionForm.value.idCard = data.idCard;
            admissionForm.value.phone = data.phone;
            admissionForm.value.laborName = data.laborName;
            admissionForm.value.workTypeName = data.teamName;
          };

          //peopleForm.sign
          const setUpEquipment = (key, type) => {
            window.parent.childListener({
              key,
              type,
            });
          };
          return {
            admissionForm,
            setUpEquipment,
          };
        },
      };
      const app = createApp(vue3Composition).use(ElementPlus).mount("#app");
    </script>
  </body>
</html>
